package jsu.blogger.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserFocusMapper {
    @Select("select followed_id from blog_system_database.user_focus " +
            "where blog_system_database.user_focus.follower_id=#{userId} " +
            "limit #{pageBegin},#{pageSize}")
    List<Long> selectFollowedIdPageByFollowerId(@Param("userId")Long userId,
                                                @Param("pageBegin")int pageBegin,
                                                @Param("pageSize") int pageSize);

    @Select("select followed_id from blog_system_database.user_focus " +
            "where blog_system_database.user_focus.follower_id=#{userId} ")
    List<Long> selectFollowedIdByFollowerId(@Param("userId")Long userId);
}
